// 云函数入口文件
const cloud = require('wx-server-sdk')

var md5 = require('md5');


cloud.init({
    env:cloud.DYNAMIC_CURRENT_ENV
})


// 云函数入口函数
exports.main = async (event, context) => {
   
    const ctx = cloud.getWXContext()
 
    const db = cloud.database({
        
    })
    console.log('sss',ctx.OPENID)
   let res =  await db.collection('user_subscribe').where({
        _id:ctx.OPENID
    }).get()
    return res.data[0]
    //console.log('同步成功');
}